package com.hhf.springboot.constant;

import org.apache.commons.lang3.StringUtils;

/**
 * @Author hhf
 * @Date 2024/10/3
 * @Description
 */
public interface MethodConstant {

    String INTERFACE_METHOD_GET = "GET";
    String INTERFACE_METHOD_POST = "POST";
    String INTERFACE_METHOD_PUT = "PUT";
    String INTERFACE_METHOD_DELETE = "DELETE";

    static boolean isMethodConstant(String str){
        if (StringUtils.isBlank(str)){
            return false;
        }
        if (str.equals(INTERFACE_METHOD_GET) || str.equals(INTERFACE_METHOD_POST) || str.equals(INTERFACE_METHOD_PUT) || str.equals(INTERFACE_METHOD_DELETE)){
            return true;
        }
        return false;
    }
}
